home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Internet
/
Collection of Internet.iso
/
infosrvr
/
doc
/
www_talk.arc
/
000112_connolly@pixel.convex.com _Sun Jun 7 08:20:25 1992.msg
< prev
next >
Wrap
Internet Message Format
|
1992-11-30
|
2KB
Return-Path: <connolly@pixel.convex.com>
Received: from dxmint.cern.ch by nxoc01.cern.ch (NeXT-1.0 (From Sendmail 5.52)/NeXT-2.0)
id AA09268; Sun, 7 Jun 92 08:20:25 MET DST
Received: by dxmint.cern.ch (dxcern) (5.57/3.14)
id AA14076; Sun, 7 Jun 92 08:18:31 +0200
Received: from convex-inet.convex.com by mcsun.EU.net with SMTP
id AA06010 (5.65b/CWI-2.167); Sun, 7 Jun 1992 08:18:19 +0200
Received: from pixel.convex.com by convex.convex.com (5.64/1.35)
id AA14512; Sun, 7 Jun 92 01:15:38 -0500
Received: from localhost by pixel.convex.com (5.64/1.28)
id AA15478; Sun, 7 Jun 92 01:15:36 -0500
Message-Id: <9206070615.AA15478@pixel.convex.com>
To: www-talk@nxoc01.cern.ch
Subject: overkill on portability macros
Date: Sun, 07 Jun 92 01:15:34 CDT
From: Dan Connolly <connolly@pixel.convex.com>
Are these abuses of the preprocessor really necessary?
----
PRIVATE char from_hex ARGS1(char, c)
{
}
----
Ok, I've seen PRIVATE before (though I don't know what it's
for. Some sort of MS DOS near/far thing?)
But ANSI C and PCC share syntax for _defining_ functions.
The preprocessor dancing is necessary for _declaring_ functions
like so:
int foo __ARGS__((int x, int y, int z));
but in the .c files, you can just do the usual
int foo(x,y,z)
int x;
int y;
int z;
and ANSI an PCC compilers alike will be happy, with one
exception: varargs. Functions with
int foo(int x, ...);
style declarations need corresponding
int foo(int x, ...)
{
}
style definitions.
Dan